/**
 * Created by 张鹏 on 2017/7/19.
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../home.vue'
import Login from '@/components/login.vue'
import Account from '@/components/account.vue'
import Logs from '@/components/logs.vue'
import ResetPwd from '@/components/resetPwd.vue'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: '/home'
}, {
    path: '/login',
    component: Login
}, {
    path: '/home',
    component: Home,
    children: [{
        path: '',
        component: Logs,
        meta: ['Logs', ]
    }]
}, {
    path: '/accounts',
    component: Home,
    children: [{
        path: '',
        component: Account,
        meta: ['Accounts', ]
    }]
}, {
    path: '/logs',
    redirect: '/home'
}]

export default new VueRouter({
    mode: 'history',
    routes: routes
})